//Kawasaki Kagami Bless GCH
#include<bits/stdc++.h>
using namespace std;
int h[100100];
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    for (int i=1;i<=n;i++)
    {
        int x;
        cin>>x;
        h[x]++;
    }
    int rem=0,ans=0;
    for (int i=1;i<=100000;i++)
    {
        if (h[i]==0) continue;
        ans+=min(rem,h[i]);
        rem-=min(rem,h[i]);
        rem+=h[i];
    }
    cout<<n-ans;
    return 0;
}